<template>
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white" >
        <van-swipe-item v-for="item in imgs" :key="item.cid">
            <img :src="item.icon_url" alt="">
        </van-swipe-item>
    </van-swipe>
</template>

<script>
export default {
    name:"SwiperView",
    data(){
        return{
            imgs:[]
        }
    },
    async created(){
        let res = await this.$http.getHomeApi();
        // console.log(res.data.data.list[0].icon_list);
        this.imgs = res.data.data.list[0].icon_list;
        // console.log(this.imgs)
    },
}
</script>

<style scoped lang="less">
*{
    margin: 0;
    padding: 0;
}
.my-swipe{
    border-radius: .4rem;
    height: 10rem;
    box-sizing: border-box;
    margin: 0 .6rem;
}
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    line-height: 150px;
    text-align: center;
    background-color: #39a9ed;
    img{
        width: 100%;
        height: 100%;
    }
}
</style>